package cc.aaa;

/**
 * @author ${崔灿}
 * @date 2022/10/25 09:36
 **/

public class Demo01 {
    public static void main(String[] args) {
        Demo02<Integer> integerDemo02 = new Demo02<Integer>(9,5);
        System.out.println(integerDemo02);
        Demo02<String> stringDemo02 = new Demo02<String>("东150", "西150");
        System.out.println(stringDemo02);

        Demo03<Integer> objectDemo03 = new Demo03(6);
        fun(objectDemo03);

        Demo03<String> demo03 = new Demo03("wp");
        fun(demo03);

    }
public static void fun(Demo03<?> demo03) {
        demo03.show();
    }
}
class Demo03<T>{
    private T var;
    public void show(){
        System.out.println("//////////////");
    }

    public Demo03(T var) {
        this.var = var;
    }

    public T getVar() {
        return var;
    }

    public void setVar(T var) {
        this.var = var;
    }

    @Override
    public String toString() {
        return "cc.aaa.Demo03{" +
                "var=" + var +
                '}';
    }
}
